import 'dart:convert';

import 'package:enterprise_v6_app/generated/json/base/json_field.dart';
import 'package:enterprise_v6_app/generated/json/get_children_entity.g.dart';
import 'package:get/get_rx/src/rx_types/rx_types.dart';


@JsonSerializable()
class GetChildrenEntity {

	GetChildrenEntity();

	factory GetChildrenEntity.fromJson(Map<String, dynamic> json) => $GetChildrenEntityFromJson(json);
	String? id;
	String? companyCode;
	String? textbookId;
	String? commentContent;
	String? commentUserId;
	String? commentUserName;
	dynamic commentPid;
	int? commentType;
	dynamic commentScore;
	int? commentLike;
	int? commentSee;
	String? commentPath;
	int? isLike;
	String? createBy;
	dynamic createById;
	String? createDate;
	String? updateBy;
	dynamic updateById;
	String? updateDate;
	String? deleted;
	List<GetChildrenChildren>? children;
	dynamic commentCount;

	Map<String, dynamic> toJson() => $GetChildrenEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class GetChildrenChildren {//是否被点赞了
	GetChildrenChildren();

	factory GetChildrenChildren.fromJson(Map<String, dynamic> json) => $GetChildrenChildrenFromJson(json);
	String? id;
	String? companyCode;
	String? textbookId;
	String? commentContent;
	String? commentUserId;
	String? commentUserName;
	String? commentPid;
	int? commentType;
	dynamic commentScore;
	int? commentLike;
	int? commentSee;
	String? commentPath;
	int? isLike;
	String? createBy;
	dynamic createById;
	String? createDate;
	String? updateBy;
	dynamic updateById;
	String? updateDate;
	String? deleted;
	List<GetChildrenChildrenChildren>? children;
	dynamic commentCount;

  ///子类是否显示 控制背景颜色
  @JSONField(serialize: false,deserialize: false)
  RxBool isShow=false.obs;

  ///控制背景颜色
  // @JSONField(serialize: false,deserialize: false)
  // RxBool isShowBg=false.obs;
  ///默认本地操作点赞
  @JSONField(serialize: false,deserialize: false)
  RxInt? commentLikeX=0.obs;
  @JSONField(serialize: false,deserialize: false)
  bool commentLikeXOnclick=false;

	Map<String, dynamic> toJson() => $GetChildrenChildrenToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class GetChildrenChildrenChildren {//是否被点赞了
	GetChildrenChildrenChildren();

	factory GetChildrenChildrenChildren.fromJson(Map<String, dynamic> json) => $GetChildrenChildrenChildrenFromJson(json);
	String? id;
	String? companyCode;
	String? textbookId;
	String? commentContent;
	String? commentUserId;
	String? commentUserName;
	String? commentPid;
	int? commentType;
	dynamic commentScore;
	int? commentLike;
	int? commentSee;
	String? commentPath;
	int? isLike;
	String? createBy;
	dynamic createById;
	String? createDate;
	String? updateBy;
	dynamic updateById;
	String? updateDate;
	String? deleted;
	List<dynamic>? children;
	dynamic commentCount;

  ///默认本地操作点赞
  @JSONField(serialize: false,deserialize: false)
  RxInt? commentLikeX=0.obs;
  @JSONField(serialize: false,deserialize: false)
  bool commentLikeXOnclick=false;

	Map<String, dynamic> toJson() => $GetChildrenChildrenChildrenToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}
